package org.jaronsource.framework.tools.codegen;

public class CommonCodeGenConfiguation extends CodeGenConfiguation {

	public CommonCodeGenConfiguation() {
		processors.add( new org.jaronsource.framework.tools.codegen.GenericProcessor() );
		processors.add( new org.jaronsource.framework.tools.codegen.JavaProcessor() );

		{
			SimpleGenericArtifact simpleGenericArtifact = new org.jaronsource.framework.tools.codegen.SimpleGenericArtifact();
			simpleGenericArtifact.setTemplateName( "jsp-list.ftl" );
			simpleGenericArtifact.setOutputDir( "{baseOutput}/views/{domainname}" );
			simpleGenericArtifact.setOutputFileName( "{domainname}_list.jsp" );
			artifacts.add( simpleGenericArtifact );
		}

		{
			SimpleGenericArtifact simpleGenericArtifact = new org.jaronsource.framework.tools.codegen.SimpleGenericArtifact();
			simpleGenericArtifact.setTemplateName( "jsp-show.ftl" );
			simpleGenericArtifact.setOutputDir( "{baseOutput}/views/{domainname}" );
			simpleGenericArtifact.setOutputFileName( "{domainname}_show.jsp" );
			artifacts.add( simpleGenericArtifact );
		}

		{
			SimpleGenericArtifact simpleGenericArtifact = new org.jaronsource.framework.tools.codegen.SimpleGenericArtifact();
			simpleGenericArtifact.setTemplateName( "jsp-edit.ftl" );
			simpleGenericArtifact.setOutputDir( "{baseOutput}/views/{domainname}" );
			simpleGenericArtifact.setOutputFileName( "{domainname}_edit.jsp" );
			artifacts.add( simpleGenericArtifact );
		}

		{
			SimpleGenericArtifact simpleGenericArtifact = new org.jaronsource.framework.tools.codegen.SimpleGenericArtifact();
			simpleGenericArtifact.setTemplateName( "xml-views.ftl" );
			simpleGenericArtifact.setOutputDir( "{baseOutput}/views/{domainname}" );
			simpleGenericArtifact.setOutputFileName( "views.xml" );
			artifacts.add( simpleGenericArtifact );
		}

		{
			SimpleJavaArtifact simpleJavaArtifact = new org.jaronsource.framework.tools.codegen.SimpleJavaArtifact();
			simpleJavaArtifact.setTemplateName( "java-domain.ftl" );
			simpleJavaArtifact.setOutputDir( "{baseOutput}/java/{basePackage}/{relatedPackage}" );
			simpleJavaArtifact.setOutputFileName( "{domainName}.java" );
			simpleJavaArtifact.setRelatedPackage( "domain" );
			artifacts.add( simpleJavaArtifact );
		}

		{
			SimpleJavaArtifact simpleJavaArtifact = new org.jaronsource.framework.tools.codegen.SimpleJavaArtifact();
			simpleJavaArtifact.setTemplateName( "java-controller.ftl" );
			simpleJavaArtifact.setOutputDir( "{baseOutput}/java/{basePackage}/{relatedPackage}" );
			simpleJavaArtifact.setOutputFileName( "{domainName}Controller.java" );
			simpleJavaArtifact.setRelatedPackage( "web.controller" );
			artifacts.add( simpleJavaArtifact );
		}
	}
}
